<template>
  <div class="tax">
    <h6 class="mb10" style="text-align: right" v-if="showTime.taxPeriodStart && showTime.taxPeriodEnd">
      {{ showTime.taxPeriodStart }}至{{ showTime.taxPeriodEnd }}
    </h6>
    <table class="tax-table">
      <tr>
        <th rowspan="2" colspan="2" class="tax-table__title">项目</th>
        <th rowspan="2" class="tax-table__title">栏次</th>
        <th colspan="2" class="tax-table__title">一般货物及劳务</th>
        <th colspan="2" class="tax-table__title">即征即退货物及劳务</th>
      </tr>
      <tr>
        <td class="tax-table__title">本月数</td>
        <td class="tax-table__title">本年累计</td>
        <td class="tax-table__title">本月数</td>
        <td class="tax-table__title">本年累计</td>
      </tr>
      <tr>
        <td rowspan="10" class="tax-table__title">销售额</td>
        <td class="tax-table__title">(一)按适用税率征税货物及劳务销售额</td>
        <td>1</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.taxRateSales }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.taxRateSales }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.taxRateSales }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.taxRateSales }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">其中：应税货物销售额</td>
        <td>2</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.taxableGoodsSales }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.taxableGoodsSales }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.taxableGoodsSales }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.taxableGoodsSales }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">应税劳务销售额</td>
        <td>3</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.laborSales }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.laborSales }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.laborSales }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.laborSales }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">纳税检查调整的销售额</td>
        <td>4</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.adjustedSales }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.adjustedSales }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.adjustedSales }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.adjustedSales }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">(二)按简易征收办法征税货物销售额</td>
        <td>5</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.simpleAdjustedSales }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.simpleAdjustedSales }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.simpleAdjustedSales }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.simpleAdjustedSales }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">其中：纳税检查调整的销售额</td>
        <td>6</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.simpleTaxationSales }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.simpleTaxationSales }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.simpleTaxationSales }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.simpleTaxationSales }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">(三)免、抵、退办法出口货物销售额</td>
        <td>7</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.exportSales }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.exportSales }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.exportSales }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.exportSales }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">(四)免税货物及劳务销售额</td>
        <td>8</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.dutyFreeSales }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.dutyFreeSales }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.dutyFreeSales }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.dutyFreeSales }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">其中：免税货物销售额</td>
        <td>9</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.dutyFreeGoodSales }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.dutyFreeGoodSales }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.dutyFreeGoodSales }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.dutyFreeGoodSales }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">免税劳务销售额</td>
        <td>10</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.dutyFreeLaborSales }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.dutyFreeLaborSales }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.dutyFreeLaborSales }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.dutyFreeLaborSales }}</td>
      </tr>
      <tr>
        <td rowspan="14" class="tax-table__title">税款计算</td>
        <td class="tax-table__title">销项税款</td>
        <td>11</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.outputTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.outputTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.outputTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.outputTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">进项税款</td>
        <td>12</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.inputTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.inputTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.inputTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.inputTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">上期留抵税额</td>
        <td>13</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.previousTaxAllowance }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.previousTaxAllowance }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.previousTaxAllowance }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.previousTaxAllowance }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">进项税额转出</td>
        <td>14</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.transferInputTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.transferInputTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.transferInputTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.transferInputTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">免抵退货物应退税额</td>
        <td>15</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.refundTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.refundTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.refundTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.refundTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">按适用税率计算的纳税检查应补缴税额</td>
        <td>16</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.payableTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.payableTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.payableTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.payableTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">应抵扣税额合计</td>
        <td>17</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.deductibleTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.deductibleTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.deductibleTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.deductibleTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">实际抵扣税额</td>
        <td>18</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.actualDeductionTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.actualDeductionTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.actualDeductionTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.actualDeductionTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">应纳税额</td>
        <td>19</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.payable }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.payable }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.payable }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.payable }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">期末留抵税额</td>
        <td>20</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.finalTaxAllowance }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.finalTaxAllowance }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.finalTaxAllowance }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.finalTaxAllowance }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">简易征收办法计算的应缴税额</td>
        <td>21</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.simplePayableTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.simplePayableTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.simplePayableTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.simplePayableTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">按简易征收办法计算的纳税检查应缴税额</td>
        <td>22</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.simpleCheckPayableTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.simpleCheckPayableTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.simpleCheckPayableTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.simpleCheckPayableTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">应纳税额减征额</td>
        <td>23</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.deductionTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.deductionTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.deductionTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.deductionTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">应纳税额合计</td>
        <td>24</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.taxPayableTotal }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.taxPayableTotal }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.taxPayableTotal }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.taxPayableTotal }}</td>
      </tr>
      <tr>
        <td class="tax-table__title" rowspan="14">税款缴纳</td>
        <td class="tax-table__title">期初未缴税额(多缴为负数)</td>
        <td>25</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.beginningUnpaidTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.beginningUnpaidTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.beginningUnpaidTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.beginningUnpaidTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">实收出口开具专用缴款书退税额</td>
        <td>26</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.bookRefundTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.bookRefundTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.bookRefundTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.bookRefundTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">本期已缴税额</td>
        <td>27</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.currentTaxPaid }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.currentTaxPaid }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.currentTaxPaid }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.currentTaxPaid }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">①分次预缴税额</td>
        <td>28</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.prepaidTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.prepaidTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.prepaidTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.prepaidTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">②出口开具专用缴款书预缴税额</td>
        <td>29</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.exportPrepaidTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.exportPrepaidTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.exportPrepaidTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.exportPrepaidTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">③本期缴纳上期应缴税额</td>
        <td>30</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.previousTaxPayable }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.previousTaxPayable }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.previousTaxPayable }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.previousTaxPayable }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">④本期缴纳欠缴税额</td>
        <td>31</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.paymentArrearsTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.paymentArrearsTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.paymentArrearsTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.paymentArrearsTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">期末未缴税额(多缴为负数)</td>
        <td>32</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.finalUnpaidTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.finalUnpaidTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.finalUnpaidTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.finalUnpaidTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">其中：欠缴税额(>=0)</td>
        <td>33</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.arrearsTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.arrearsTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.arrearsTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.arrearsTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">本期应补(退)税额</td>
        <td>34</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.payableAmount }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.payableAmount }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.payableAmount }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.payableAmount }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">即征即退实际退税额</td>
        <td>35</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.actualTaxRefund }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.actualTaxRefund }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.actualTaxRefund }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.actualTaxRefund }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">期初未缴查补税额</td>
        <td>36</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.beginningCheckUnpaidTax }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.beginningCheckUnpaidTax }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.beginningCheckUnpaidTax }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.beginningCheckUnpaidTax }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">本期入库查补税额</td>
        <td>37</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.currentTaxAmount }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.currentTaxAmount }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.currentTaxAmount }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.currentTaxAmount }}</td>
      </tr>
      <tr>
        <td class="tax-table__title">期末未缴查补税额</td>
        <td>38</td>
        <td>{{ taxDeclaration.generalMonth && taxDeclaration.generalMonth.finalUnpaidTaxAllowance }}</td>
        <td>{{ taxDeclaration.generalTotal && taxDeclaration.generalTotal.finalUnpaidTaxAllowance }}</td>
        <td>{{ taxDeclaration.refundMonth && taxDeclaration.refundMonth.finalUnpaidTaxAllowance }}</td>
        <td>{{ taxDeclaration.refundTotal && taxDeclaration.refundTotal.finalUnpaidTaxAllowance }}</td>
      </tr>
    </table>
  </div>
</template>

<script>
export default {
  name: 'TaxDeclaration',
  props: {
    taxDeclaration: Object,
    showTime: Object,
  },
  data() {
    return {}
  },
}
</script>

<style lang="scss" scoped>
.tax {
  &-table {
    width: 100%;
    text-align: center;
    border: 1px solid $gray-lighter;
    th,
    td {
      border: 1px solid $gray-lighter;
      color: $gray;
      height: 40px;
    }
    &__title {
      background-color: #fafafa;
    }
  }
}
</style>
